class OscBannerEntity {
	OscBannerResult result;
	int code;
	String time;
	String message;
	OscBannerNotice notice;

	OscBannerEntity({this.result, this.code, this.time, this.message, this.notice});

	OscBannerEntity.fromJson(Map<String, dynamic> json) {
		result = json['result'] != null ? new OscBannerResult.fromJson(json['result']) : null;
		code = json['code'];
		time = json['time'];
		message = json['message'];
		notice = json['notice'] != null ? new OscBannerNotice.fromJson(json['notice']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.result != null) {
      data['result'] = this.result.toJson();
    }
		data['code'] = this.code;
		data['time'] = this.time;
		data['message'] = this.message;
		if (this.notice != null) {
      data['notice'] = this.notice.toJson();
    }
		return data;
	}
}

class OscBannerResult {
	String prevPageToken;
	int requestCount;
	int totalResults;
	String nextPageToken;
	int responseCount;
	List<OscBanner> items;

	OscBannerResult({this.prevPageToken, this.requestCount, this.totalResults, this.nextPageToken, this.responseCount, this.items});

	OscBannerResult.fromJson(Map<String, dynamic> json) {
		prevPageToken = json['prevPageToken'];
		requestCount = json['requestCount'];
		totalResults = json['totalResults'];
		nextPageToken = json['nextPageToken'];
		responseCount = json['responseCount'];
		if (json['items'] != null) {
			items = new List<OscBanner>();(json['items'] as List).forEach((v) { items.add(new OscBanner.fromJson(v)); });
		}
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['prevPageToken'] = this.prevPageToken;
		data['requestCount'] = this.requestCount;
		data['totalResults'] = this.totalResults;
		data['nextPageToken'] = this.nextPageToken;
		data['responseCount'] = this.responseCount;
		if (this.items != null) {
      data['items'] =  this.items.map((v) => v.toJson()).toList();
    }
		return data;
	}
}

class OscBanner {
	String img;
	String name;
	int weight;
	String detail;
	String href;
	int id;
	int type;//0:链接，1:软件，2：？，3:博客，4：？，5：？，6:资讯  //0:链接|1-软件|2-话题|3-博客|4-新闻|5代码|6资讯|7-翻译
	String pubDate;

	OscBanner({this.img, this.name, this.weight, this.detail, this.href, this.id, this.type, this.pubDate});

	OscBanner.fromJson(Map<String, dynamic> json) {
		img = json['img'];
		name = json['name'];
		weight = json['weight'];
		detail = json['detail'];
		href = json['href'];
		id = json['id'];
		type = json['type'];
		pubDate = json['pubDate'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['img'] = this.img;
		data['name'] = this.name;
		data['weight'] = this.weight;
		data['detail'] = this.detail;
		data['href'] = this.href;
		data['id'] = this.id;
		data['type'] = this.type;
		data['pubDate'] = this.pubDate;
		return data;
	}
}

class OscBannerNotice {
	int like;
	int review;
	int softwareCount;
	int letter;
	int newsCount;
	int mention;
	int fans;

	OscBannerNotice({this.like, this.review, this.softwareCount, this.letter, this.newsCount, this.mention, this.fans});

	OscBannerNotice.fromJson(Map<String, dynamic> json) {
		like = json['like'];
		review = json['review'];
		softwareCount = json['softwareCount'];
		letter = json['letter'];
		newsCount = json['newsCount'];
		mention = json['mention'];
		fans = json['fans'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['like'] = this.like;
		data['review'] = this.review;
		data['softwareCount'] = this.softwareCount;
		data['letter'] = this.letter;
		data['newsCount'] = this.newsCount;
		data['mention'] = this.mention;
		data['fans'] = this.fans;
		return data;
	}
}
